package com.competition.web.admin.task;

import javax.annotation.Resource;

import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;

import com.common.util.TimeUtil;
import com.common.util.WithdrawalOfSurplus;
import com.competition.web.admin.service.IStaffService;
import com.competition.web.admin.task.run.LeaveTaskThread;
import com.competition.web.admin.task.run.NormalTaskThread;

@Component
public class LeaveTask {
	
	private IStaffService staffService;
	
	private ThreadPoolTaskExecutor threadPoolTaskExecutor;
	
	/**
	 * 正常 ----> 请假
	 * @throws Exception
	 */
	// ${executor-config.leave}
//	@Async("threadPoolTaskExecutor")
//	@Scheduled(cron = "${executor-config.leave}")
//	public void query() throws Exception {
//		
//		
//	}
//	
//	
//	@Async("threadPoolTaskExecutor")
//	@Scheduled(cron = "${executor-config.normal}")
//	public void leaveToNormal() throws Exception {
//		
//		
//	}
//	
	
	

	
	

	@Resource
	public void setThreadPoolTaskExecutor(ThreadPoolTaskExecutor threadPoolTaskExecutor) {
		this.threadPoolTaskExecutor = threadPoolTaskExecutor;
	}

}
